package com.esri.core.map;

import java.io.Serializable;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class FeatureEditError implements Serializable {
    private static final long serialVersionUID = 1;
    int a;
    String b;

    FeatureEditError() {
    }

    public FeatureEditError(int i, String str) {
        this.b = str;
        this.a = i;
    }

    public int getCode() {
        return this.a;
    }

    public String getDescription() {
        return this.b;
    }

    public static FeatureEditError fromJson(JsonParser jsonParser) throws Exception {
        if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
            return null;
        }
        FeatureEditError featureEditError = new FeatureEditError();
        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String currentName = jsonParser.getCurrentName();
            jsonParser.nextToken();
            if ("code".equals(currentName)) {
                featureEditError.a = jsonParser.getIntValue();
            } else if ("description".equals(currentName)) {
                featureEditError.b = jsonParser.getText();
            } else {
                jsonParser.skipChildren();
            }
        }
        return featureEditError;
    }

    public String toString() {
        return "FeatureEditError [code=" + this.a + ", description=" + this.b + "]";
    }
}
